package com.sn.pw.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sn.pw.dao.entity.ShipOrder;
import com.sn.pw.vo.req.ShippingOrderPageReq;

import com.sn.pw.vo.resp.ShippingOrderResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<ShipOrder> {

    @Select("select `ship_order`.* from `ship_order` left join evaluation on `ship_order`.company_id = evaluation.evaluator_id where `ship_order`.company_id = #{id}")
    List<ShipOrder> getEvaluationOrderByUserId(Long id);

    IPage<ShippingOrderResp> pageRetrieveOrder(IPage<Object> page,@Param("param") ShippingOrderPageReq pageReq);
}
